﻿#region Imports
using System;
using System.ComponentModel;
using CommonUtilities.Extensions;
using CommonUtilities.Properties;
using CommonUtilities.Util;
#endregion

namespace CommonUtilities.Exceptions
{
    [Description("OS Version information not available. Error: {0}")]
    public class OSVersionInfoNotAvailableException : BaseException
    {
        #region Declarations
        private static string errInformation;
        #endregion

        #region Properties
        public static string Description
        {
            get { return Utilities.GetClassDescription<SerializationTypeNotMatchedException>(MiscExtensions.IsNullOrEmpty(errInformation, Resources.Const_NotAvailable)); }
        }
        #endregion

        #region Constructors
        public OSVersionInfoNotAvailableException(string errInfo)
            : base() { errInformation = errInfo; }

        public OSVersionInfoNotAvailableException(Exception ex, string errInfo)
            : base(Description, ex) { errInformation = errInfo; }
        #endregion

        #region Methods
        public override string ToString()
        { return base.ToString(this); }
        #endregion
    }
}
